package com.example.design.factory.simplefactory;

public class SimpleFactory {
    public PlayBall playBall(String type){
        if("Basketball".equals(type)){
            return new BasketballFactory();
        }else if("Football".equals(type)){
            return new FootballFactory();
        }else {
            System.out.println("请输入正确的类型");
            return null;
        }
    }
}
